# coding: utf-8

"""
    Selling Partner API for Replenishment

    The Selling Partner API for Replenishment (Replenishment API) provides programmatic access to replenishment program metrics and offers. These programs provide recurring delivery of any replenishable item at a frequency chosen by the customer.  The Replenishment API is available worldwide wherever Amazon Subscribe & Save is available or is supported. The API is available to vendors and FBA selling partners.

    The version of the OpenAPI document: 2022-11-07
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class ListOffersRequestFilters(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'marketplace_id': 'str',
        'skus': 'List[str]',
        'asins': 'List[str]',
        'eligibilities': 'List[EligibilityStatus]',
        'preferences': 'Preference',
        'promotions': 'Promotion',
        'program_types': 'List[ProgramType]',
    }

    attribute_map = {
        'marketplace_id': 'marketplaceId',
        'skus': 'skus',
        'asins': 'asins',
        'eligibilities': 'eligibilities',
        'preferences': 'preferences',
        'promotions': 'promotions',
        'program_types': 'programTypes',
    }

    def __init__(self, marketplace_id=None, skus=None, asins=None, eligibilities=None, preferences=None, promotions=None, program_types=None, _configuration=None):  # noqa: E501
        """ListOffersRequestFilters - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._marketplace_id = None
        self._skus = None
        self._asins = None
        self._eligibilities = None
        self._preferences = None
        self._promotions = None
        self._program_types = None
        self.discriminator = None

        self.marketplace_id = marketplace_id
        if skus is not None:
            self.skus = skus
        if asins is not None:
            self.asins = asins
        if eligibilities is not None:
            self.eligibilities = eligibilities
        if preferences is not None:
            self.preferences = preferences
        if promotions is not None:
            self.promotions = promotions
        self.program_types = program_types

    @property
    def marketplace_id(self):
        """Gets the marketplace_id of this ListOffersRequestFilters.  # noqa: E501

        The marketplace identifier. The supported marketplaces for both sellers and vendors are US, CA, ES, UK, FR, IT, IN, DE and JP. The supported marketplaces for vendors only are BR, AU, MX, AE and NL. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) to find the identifier for the marketplace.  # noqa: E501

        :return: The marketplace_id of this ListOffersRequestFilters.  # noqa: E501
        :rtype: str
        """
        return self._marketplace_id

    @marketplace_id.setter
    def marketplace_id(self, marketplace_id):
        """Sets the marketplace_id of this ListOffersRequestFilters.

        The marketplace identifier. The supported marketplaces for both sellers and vendors are US, CA, ES, UK, FR, IT, IN, DE and JP. The supported marketplaces for vendors only are BR, AU, MX, AE and NL. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) to find the identifier for the marketplace.  # noqa: E501

        :param marketplace_id: The marketplace_id of this ListOffersRequestFilters.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and marketplace_id is None:
            raise ValueError("Invalid value for `marketplace_id`, must not be `None`")  # noqa: E501

        self._marketplace_id = marketplace_id

    @property
    def skus(self):
        """Gets the skus of this ListOffersRequestFilters.  # noqa: E501

        A list of SKUs to filter. This filter is only supported for sellers and not for vendors.  # noqa: E501

        :return: The skus of this ListOffersRequestFilters.  # noqa: E501
        :rtype: List[str]
        """
        return self._skus

    @skus.setter
    def skus(self, skus):
        """Sets the skus of this ListOffersRequestFilters.

        A list of SKUs to filter. This filter is only supported for sellers and not for vendors.  # noqa: E501

        :param skus: The skus of this ListOffersRequestFilters.  # noqa: E501
        :type: List[str]
        """
        if (self._configuration.client_side_validation and
                skus is not None and len(skus) > 20):
            raise ValueError("Invalid value for `skus`, number of items must be less than or equal to `20`")  # noqa: E501
        if (self._configuration.client_side_validation and
                skus is not None and len(skus) < 1):
            raise ValueError("Invalid value for `skus`, number of items must be greater than or equal to `1`")  # noqa: E501

        self._skus = skus

    @property
    def asins(self):
        """Gets the asins of this ListOffersRequestFilters.  # noqa: E501

        A list of Amazon Standard Identification Numbers (ASINs).  # noqa: E501

        :return: The asins of this ListOffersRequestFilters.  # noqa: E501
        :rtype: List[str]
        """
        return self._asins

    @asins.setter
    def asins(self, asins):
        """Sets the asins of this ListOffersRequestFilters.

        A list of Amazon Standard Identification Numbers (ASINs).  # noqa: E501

        :param asins: The asins of this ListOffersRequestFilters.  # noqa: E501
        :type: List[str]
        """
        if (self._configuration.client_side_validation and
                asins is not None and len(asins) > 20):
            raise ValueError("Invalid value for `asins`, number of items must be less than or equal to `20`")  # noqa: E501
        if (self._configuration.client_side_validation and
                asins is not None and len(asins) < 1):
            raise ValueError("Invalid value for `asins`, number of items must be greater than or equal to `1`")  # noqa: E501

        self._asins = asins

    @property
    def eligibilities(self):
        """Gets the eligibilities of this ListOffersRequestFilters.  # noqa: E501

        A list of eligibilities associated with an offer.  # noqa: E501

        :return: The eligibilities of this ListOffersRequestFilters.  # noqa: E501
        :rtype: List[EligibilityStatus]
        """
        return self._eligibilities

    @eligibilities.setter
    def eligibilities(self, eligibilities):
        """Sets the eligibilities of this ListOffersRequestFilters.

        A list of eligibilities associated with an offer.  # noqa: E501

        :param eligibilities: The eligibilities of this ListOffersRequestFilters.  # noqa: E501
        :type: List[EligibilityStatus]
        """
        if (self._configuration.client_side_validation and
                eligibilities is not None and len(eligibilities) < 1):
            raise ValueError("Invalid value for `eligibilities`, number of items must be greater than or equal to `1`")  # noqa: E501

        self._eligibilities = eligibilities

    @property
    def preferences(self):
        """Gets the preferences of this ListOffersRequestFilters.  # noqa: E501


        :return: The preferences of this ListOffersRequestFilters.  # noqa: E501
        :rtype: Preference
        """
        return self._preferences

    @preferences.setter
    def preferences(self, preferences):
        """Sets the preferences of this ListOffersRequestFilters.


        :param preferences: The preferences of this ListOffersRequestFilters.  # noqa: E501
        :type: Preference
        """

        self._preferences = preferences

    @property
    def promotions(self):
        """Gets the promotions of this ListOffersRequestFilters.  # noqa: E501


        :return: The promotions of this ListOffersRequestFilters.  # noqa: E501
        :rtype: Promotion
        """
        return self._promotions

    @promotions.setter
    def promotions(self, promotions):
        """Sets the promotions of this ListOffersRequestFilters.


        :param promotions: The promotions of this ListOffersRequestFilters.  # noqa: E501
        :type: Promotion
        """

        self._promotions = promotions

    @property
    def program_types(self):
        """Gets the program_types of this ListOffersRequestFilters.  # noqa: E501

        A list of replenishment program types.  # noqa: E501

        :return: The program_types of this ListOffersRequestFilters.  # noqa: E501
        :rtype: List[ProgramType]
        """
        return self._program_types

    @program_types.setter
    def program_types(self, program_types):
        """Sets the program_types of this ListOffersRequestFilters.

        A list of replenishment program types.  # noqa: E501

        :param program_types: The program_types of this ListOffersRequestFilters.  # noqa: E501
        :type: List[ProgramType]
        """
        if self._configuration.client_side_validation and program_types is None:
            raise ValueError("Invalid value for `program_types`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                program_types is not None and len(program_types) < 1):
            raise ValueError("Invalid value for `program_types`, number of items must be greater than or equal to `1`")  # noqa: E501

        self._program_types = program_types

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(ListOffersRequestFilters, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, ListOffersRequestFilters):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, ListOffersRequestFilters):
            return True

        return self.to_dict() != other.to_dict()
